package com.dyna.gateway.domain.dto;

import com.dyna.domain.dto.LoginUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@ApiModel(value = "RPC 服务 - OAuth2 访问令牌的校验 Response DTO")
@Data
public class OAuth2AccessTokenCheckRespDTO implements Serializable {

    @ApiModelProperty(value = "用户编号", example = "10")
    private Long uid;

    @ApiModelProperty(value = "用户类型，参见 UserTypeEnum 枚举", example = "1")
    private Integer userType;

    @ApiModelProperty(value = "用户信息", example = "{\"nickname\": \"芋道\"}")
    private LoginUser userInfo;

    @ApiModelProperty(value = "租户编号", example = "1024")
    private Long tenantId;

    @ApiModelProperty(value = "授权范围的数组", example = "user_info")
    private List<String> scopes;

    @ApiModelProperty(value = "过期时间")
    private LocalDateTime expiresTime;

}
